﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;

namespace WindowsGame3
{
    public class block
    {

        public Texture2D CreateRectangle(int width, int height, GraphicsDevice g)
        {
                       
            Texture2D rectangleTexture = new Texture2D(g, width, height, 1, TextureUsage.None, SurfaceFormat.Color);

            Color[] color = new Color[width * height];//set the color to the amount of pixels

            for (int i = 0; i < color.Length; i++)//loop through all the colors setting them to whatever values we want
            {
                color[i] = new Color(0, 255, 255, 255);
            }
            rectangleTexture.SetData(color);//set the color data on the texture
            return rectangleTexture;
        }

    }
}
